<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
    <?php $headtitle=$GLOBALS['ts']['site']['site_name']; ?>
    <title><?php echo $headtitle;?></title>
    <!--<base href="__APP__/" />-->
    <meta charset="utf-8">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="__APP__/css/pure.css">
    <link rel="stylesheet" href="__APP__/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="__APP__/css/pureUI.css?t=1.18">
    <link rel="stylesheet" type="text/css" href="__APP__/css/ts.css"/>
    <!--TS-U function-->
    <script type="text/javascript">
        var SITE_URL  = '<?php echo SITE_URL; ?>';
        //载入函数
        var U = function(url, params) {
            var website = SITE_URL+'/index.php';
            url = url.split('/');
            if(url[0]=='' || url[0]=='@')
                url[0] = APPNAME;
            if (!url[1])
                url[1] = 'Index';
            if (!url[2])
                url[2] = 'index';
            website = website+'?app='+url[0]+'&mod='+url[1]+'&act='+url[2];
            if(params) {
                params = params.join('&');
                website = website + '&' + params;
            }
            return website;
        };
        var _static = '__APP__';
    </script>
    <script src="__APP__/js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript" src="__APP__/js/appframework.js"></script>
    <script src="__APP__/js/jquery.tap.min.js"></script>
    <script src="__APP__/js/iscroll.js"></script>
    <script src="__APP__/js/zepto.js"></script>
    <!--script src="__THEME__/js/jquery-1.7.1.min.js?v=<?php echo ($site["sys_version"]); ?>"></script-->
    <!--<script src="__THEME__/js/core.wap.js?v=<?php echo ($site["sys_version"]); ?>"></script>-->

    <!--<script src="__THEME__/js/core.js?v=<?php echo ($site["sys_version"]); ?>"></script>-->

    <!--<script src="__THEME__/js/module.wap.js?v=<?php echo ($site["sys_version"]); ?>"></script>-->

    <!--<script src="__THEME__/js/module.js?v=<?php echo ($site["sys_version"]); ?>"></script>-->

    <!--script src="__THEME__/js/common.js?v=<?php echo ($site["sys_version"]); ?>"></script>
    <script src="__THEME__/js/module.js?v=<?php echo ($site["sys_version"]); ?>"></script>
    <script src="__THEME__/js/core.js?v=<?php echo ($site["sys_version"]); ?>"></script-->
    <!--<script src="__APP__/plugins/af.touchEvents.js"></script>-->
    <!--<script src="__APP__/js/ui.js?t=1.16-dev"></script>-->
    <script src="__APP__/js/ui4jq.js"></script>
    <script src="__APP__/js/basic.js?t=1.03"></script>
    <script src="__APP__/js/app.js?t=1.06-dev"></script>

<script>
/**
 * 全局变量
 */
var SITE_URL  = '<?php echo SITE_URL; ?>';
var UPLOAD_URL= '<?php echo UPLOAD_URL; ?>';
var THEME_URL = '__THEME__';
var APPNAME   = '<?php echo APP_NAME; ?>';
var MID       = '<?php echo $mid; ?>';
var UID       = '<?php echo $uid; ?>';
var initNums  =  '<?php echo $initNums; ?>';
var SYS_VERSION = '<?php echo $site["sys_version"]; ?>'
var ISWAP = 1;
// Js语言变量
var LANG = new Array();
</script>
<?php if(!empty($langJsList)) { ?>
<?php if(is_array($langJsList)): ?><?php $i = 0;?><?php $__LIST__ = $langJsList?><?php if( count($__LIST__)==0 ) : echo "" ; ?><?php else: ?><?php foreach($__LIST__ as $key=>$vo): ?><?php ++$i;?><?php $mod = ($i % 2 )?><script src="<?php echo ($vo); ?>?v=<?php echo ($site["sys_version"]); ?>"></script><?php endforeach; ?><?php endif; ?><?php else: echo "" ;?><?php endif; ?>
<?php } ?>
<script type="text/javascript" src="__APP__/js/form.js?v=<?php echo ($site["sys_version"]); ?>"></script>
<script type="text/javascript" src="__APP__/js/core.js?v=<?php echo ($site["sys_version"]); ?>"></script>
<script type="text/javascript" src="__THEME__/js/module.js?v=<?php echo ($site["sys_version"]); ?>"></script>
<script src="__THEME__/js/js.php?t=js&f=jquery.form.js,common.js,module.js,module.common.js,jwidget_1.0.0.js,jquery.atwho.js,jquery.caret.js,ui.core.js,plugins/core.comment.js,plugins/core.digg.js&v=<?php echo ($site["sys_version"]); ?>.js"></script>
<script src="__THEME__/js/plugins/core.comment.js?v=<?php echo ($site["sys_version"]); ?>"></script>
<script src="__THEME__/js/plugins/core.digg.js?v=<?php echo ($site["sys_version"]); ?>"></script>
</head>
<body>
<div id="wechat_bar" class="hide">
    <div id="wechat_back" class="fa fa-chevron-left"></div>
    <div id="wechat_forward" class="fa fa-chevron-right"></div>
    <div class="fa"></div>
    <div id="wechat_menu" class="fa fa-bars"></div>
</div>
<div id="menu">
    <?php if( !isset($_SESSION["mid"])): ?><div class="pure-menu pure-menu-open">
        <ul>
            <li class="pure-menu-selected">
                <a href="<?php echo U('w3g/Public/home');?>">
                    <div class="sidebar-ico sidebar-home"></div>
                    <div>广场</div>
                </a>
            </li>
            <li>
                <a href="<?php echo U('w3g/Public/login');?>">
                    <div class="sidebar-ico sidebar-login"></div>
                    <div>登录</div>
                </a>
            </li>
            <li>
                <a href="<?php echo U('w3g/Public/register');?>">
                    <div class="sidebar-ico sidebar-register"></div>
                    <div>注册帐号</div>
                </a>
            </li>
            <li>
                <a href="<?php echo U('w3g/Public/about');?>">
                    <div class="sidebar-ico sidebar-about"></div>
                    <div>关于我们</div>
                </a>
            </li>
        </ul>
    </div><?php endif; ?>
<?php if(isset($_SESSION["mid"])): ?><?php echo W('UserInformation', array('uid'=>$mid, 'tpl'=>'w3gTop', 'isReturn'=>$isReturn));?>
    <div class="pure-menu pure-menu-open">
        <ul>
            <li <?php if($_GET['mod']=='Public' && $_GET['act'] == 'home'){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Public/home');?>">
                    <div class="sidebar-ico sidebar-home"></div>
                    <div>广场</div>
                </a>
            </li>
            <li <?php if($_GET['mod']=='Index' && ($_GET['act'] == 'all' || $_GET['act'] == 'weibo')){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Index/index');?>">
                    <div class="sidebar-ico sidebar-weibo"></div>
                    <div>朋友圈</div>
                </a>
            </li>
            <li <?php if($_GET['mod']=='Channel'){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Channel/index');?>">
                    <div class="sidebar-ico sidebar-channel"></div>
                    <div>频道</div>
                </a>
            </li>
            <li <?php if($_GET['mod']=='Weiba'){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Weiba/index');?>">
                    <div class="sidebar-ico sidebar-weiba"></div>
                    <div>微吧</div>
                </a>
            </li>
            <li <?php if($_GET['mod']=='People'){ ?>class="pure-menu-selected"<?php } ?>>
            <a href="<?php echo U('w3g/People/index');?>">
                <div class="sidebar-ico sidebar-people"></div>
                <div>找伙伴</div>
            </a>
            </li>
            <li <?php if($_GET['act']=='discover'){ ?>class="pure-menu-selected"<?php } ?>>
            <a href="<?php echo U('w3g/Public/discover');?>">
                <div class="sidebar-ico sidebar-discover"></div>
                <div>发现</div>
            </a>
            </li>
            <li <?php if($_GET['act']=='sign_in'){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Public/sign_in');?>">
                    <div class="sidebar-ico sidebar-signin"></div>
                    <div>签到</div>
                </a>
            </li>
            <li <?php if($_GET['act']=='msgbox'){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Index/msgbox');?>">
                    <div class="sidebar-ico sidebar-message"></div>
                    <div class="sidebar-tips" id="messageSidr">消息<i class="num"></i></div>
                </a>
            </li>
            <li <?php if($_GET['mod']=='Setting'){ ?>class="pure-menu-selected"<?php } ?>>
                <a href="<?php echo U('w3g/Setting/index');?>">
                    <div class="sidebar-ico sidebar-setting"></div>
                    <div>设置</div>
                </a>
            </li>
            <li>
                <a href="<?php echo U('w3g/Public/log_out');?>">
                    <div class="sidebar-ico sidebar-logout"></div>
                    <div>退出</div>
                </a>
            </li>
        </ul>
    </div><?php endif; ?>
</div>
<div id="header">
    <div id="header-buttons">
        <div id="back" class="header-menu-link"></div>
        <div id="messageLink" class="header-menu-link"><a href="<?php echo U('w3g/Index/msgbox');?>"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
    </div>
    <h1>
        <!--<?php echo $headtitle;?>-->
        <img src="<?php if($logo) { ?><?php echo ($logo); ?><?php } else { ?>__APP__/img/sys/logo.png<?php } ?>" alt="<?php echo $headtitle;?>">
    </h1>
</div>
<div id="layout">
    <!-- Menu toggle -->
    <!--<a id="menuLink" class="menu-link">-->
        <!-- Hamburger icon -->
        <!--<span></span>-->
    <!--</a>-->
    <div id="main">
<style type="text/css">
    body,#content,#content > div{background-color: #f8f8f8;}
</style>
<div id="content">
    <div id="home" data-title="签到" selected="true" data-footer="none" data-menu="publicmenu" data-load="$.ui.squareContainer();">
        <header>
            <div id="header-buttons">
                <!-- <a href="<?php echo ($_SERVER['HTTP_REFERER']); ?>">
                    <div id="back" class="header-menu-link" data-back="false">
                    </div>
                </a> -->

                <div id="messageLink" class="header-menu-link"><a href="<?php echo U('w3g/Index/msgbox');?>"><i class="num"></i></a></div>
        <div id="menuLink" class="header-menu-link"></div>
            </div>
            <h1>
                签到
            </h1>
        </header>
        <div class="pure-g">
            <?php echo W('CheckIn', array('tpl'=>'w3g_sign_in'));?>
        </div>
    </div>
            <!--sys-->
        <!-- <div id="about" data-title="关于ThinkSNS">
            <p>这里是关于页面。</p>
        </div> -->
        <!--pureUI-->

    </div><!--content-->
</div><!--main-->
<script>
    (function(){
        TS.cache.profile = {
            uid:'<?php echo ($profile["uid"]); ?>',
            uname:'<?php echo ($profile["uname"]); ?>',
            email:'<?php echo ($profile["email"]); ?>',
            avatar_original:'<?php echo ($profile["avatar_original"]); ?>',
            avatar_small:'<?php echo ($profile["avatar_small"]); ?>'
        };
    })();
</script>
</div>
<div id="pure-shadow"></div>
<div id="footer"></div>
</body>
</html>